package cn.le.handler;

import cn.le.util.ConnectionUtil;
import io.netty.channel.ChannelHandlerContext;
import io.netty.channel.ChannelInboundHandlerAdapter;

public class InactiveHandler extends ChannelInboundHandlerAdapter {

    @Override
    public void channelInactive(ChannelHandlerContext ctx) throws Exception {
        //断开链接
        System.out.println("断开链接");
        ConnectionUtil.exit(ctx.channel().id());
    }
}
